<!DOCTYPE html>
<html>
	<head>
		<!-- Update title -->
		<title>TinderBox</title>

		<!-- keywords used for searching -->
		<meta name="keywords" content="guide">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<!-- reference to Cinder classes -->
   		<!-- <ci seealso dox="[CLASS NAME GOES HERE]" label="[NAME OF LINK]"></ci> -->

   		<!-- master stylesheet - these links will be replaced when compiled -->
		<link rel="stylesheet" href="../../_assets/css/foundation.css">
		<link rel="stylesheet" href="../../_assets/css/prism.css">
		<link rel="stylesheet" href="../../_assets/css/style.css">
		<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>

		<!-- Place additional stylsheet links here, which will be copied over when compiled (optional) -->
		
	</head>

	<body id="guide-contents" class="language-c++">

		<!-- CONTENT STARTS HERE -->

		<img src="images/tinderbox_logo.png" style="float:right; padding-left:20px;" />
		<section>
			<h1>TinderBox</h1>
				
			<p>TinderBox is an application included with Cinder that simplifies the creation of new projects. It can create both Xcode and Visual Studio projects. It can also integrate CinderBlocks (prepackaged libraries for use with Cinder) into your application.
			</p>
	
			<h3>Launching TinderBox</h3>
			<p>On OS X, TinderBox is located at <em>Cinder/tools/TinderBox-Mac/TinderBox.app</em>. On Windows it's located at <em>Cinder/tools/TinderBox-Win/TinderBox.exe</em></p>
	
			<h3>Basic Usage</h3>
			<p>After launching TinderBox you'll see a screen like this:</p>
			<img class="center" src="images/1.png" />
	
			<h3>Template</h3>
			<p>This field allows you to select the kind of project you want to create. The defaults include a <strong>Basic OpenGL</strong> application, a <strong>Screensaver</strong> or an OS X-specific project type <strong>Cocoa OpenGL</strong>, which allows simple integration of a Cocoa user interface with an OS X application.</p>
			<p>CinderBlocks can also optionally supply project templates, which can serve as a jumpstart specific to it.</p>
			
			<h3>Project Name</h3>
			<p>Here you enter the name of your project, with no spaces. This field will affect the names of the files TinderBox outputs, and will also be integrated into the automatically generated source code.</p>
			
			<h3>Location</h3>
			<p>This is the destination path where your project will be created. In the example in the screenshot, a new project would be created at <em>/Users/andrewfb/tmp/ExampleProject</em>.</p>
			
			<h3>Cinder Version</h3>
			<p>This is the version of Cinder which the project will be compiled against. Advanced users can point TinderBox at multiple installations of Cinder on one machine, which is possible via the <em>Settings...</em> button in the TinderBox main window.</p>
			
			<h3>Environment</h3>
			<p>This toggle allows you to select which types of compiler/platform combinations you'll be targeting. Options include OS X or iOS via Xcode, as well as the 2013 versions of Visual C++.</p>
			
			<h3>Create local git repository</h3>
			<p>When enabled this causes TinderBox to automatically create a local git repository for your project. This options requires git to be accessible in your system's path.</p>
	
			<p>After setting the fields appropriately click the <em>Next</em> button.</p>
		</section>

		<section>
			<h2>CinderBlocks</h2>
			<p>CinderBlocks are prepackaged libraries of code designed to interoperate with Cinder. You can read more about them in <a href="../cinder-blocks/index.html">this document</a>.</p>

			<p>TinderBox can include CinderBlocks in your application:</p>
			<img class="center" src="images/2.png" />
			<p>The list on the left will reflect which CinderBlocks are available in the currently selected version of Cinder's <em>blocks</em> directory. Single-clicking a block will reveal details on the right. To include a CinderBlock in your application, select one of the installation types from the <strong>Install</strong> menu:</p>

			<img class="center" src="images/cinderblock_install.png" />

			<table style="width: 100%; border-spacing: 3px;">
			<tbody>
			<tr>
			 <td style="text-align: right"><strong>Copy:</strong></td><td>The contents of the CinderBlock are copied to a project-local <em>blocks</em> folder.</td>
			</tr>
			<tr>
			 <td style="text-align: right"><strong>Relative:</strong></td><td>The project's paths are setup relative to where the CinderBlock exists on disk. No files are copied.</td>
			</tr>
			<tr>
			 <td style="text-align: right"><strong>Git Submodule:</strong></td><td>The CinderBlock is added to the project as a git submodule.<br/></td>
			</tr>
			</tbody>
			</table>
			
			<p>The best style of installation for a CinderBlock is largely a function of disk/repository space requirements, project maintainability and interoperability with other developers. When in doubt, select <em>Copy</em>.</p>
			
			<p>The <em>Copy</em> install type is the least efficient in terms of disk and repository size as a complete copy of all files are added to the project repository (in a local blocks directory). However it is the simplest solution in terms of guaranteeing that all necessary files are in a predictable location.</p>
			
			<p>The <em>Relative</em> install type has a size advantage in that no files are copied or added to a repository. However it expects all developers to have a copy of the CinderBlock in the same place (generally a Cinder installation's blocks folder). This is often a reasonable expectation however, particularly when using one of Cinder's built-in blocks like QuickTime.</p>
			
			<p>The <em>Git Submodule</em> install type is only available when a user has chosen to setup a git repository for the project, and when the CinderBlock itself has a git repository associated with it. However in these circumstances, a git submodule can be ideal. It requires no additional space in the project repository (which can be important with a large CinderBlock such as OpenCV, which has hundreds of megabytes of binaries). However a submodule still marks a formal dependency which can be tracked and changed to point at newer versions of a CinderBlock as it and the dependent project evolve.</p>
		</section>		

		<section>
			<h2>Completion</h2>
			<p>After you've selected any CinderBlocks you'd like included with your project, click the <em>Finish</em> button. The OS X Finder or Windows Explorer will automatically open to the path of your newly created project. Note that a <em>blocks</em> folder will have been created if you have chosen to install any CinderBlocks.</p>
			<img class="center" src="images/results.png" />
		</section>

		<!-- END CONTENT -->

		<!-- Scripts -->
		<script src="../../_assets/js/prism.js" type="text/javascript"></script>
		<!-- Place additional scripts here (optional) -->
		<!-- <script type="text/javascript"></script> -->

	</body>
</html> 